package load.io;


import core.InPort;
import core.StdNode;
import core.TriggerPort;

/**
 * Node useful for printing to a PrintStream. 
 * By default outStream is linked to Print.out
 * 
 * @author Wijnand
 */
public class Printer extends StdNode {
	
	private InPort content = new InPort(Object.class);
			
	private TriggerPort print = new TriggerPort() {
		@Override
		public void callInternal() {
                controller.StdOut.getInstance().getPS().print(content.getValue()+" ");
			
		}	
	};
			
	/**
	 * By default outStream is linked to Print.out
	 */
	public Printer()
	{
		this.autoPutPorts();
	}
	
}
